<?php

namespace app\api\model;


use think\Model;
use think\model\concern\SoftDelete;

class UserDepartmentModel extends Model
{
    protected $name = 'user_department';

    use SoftDelete;
    protected $defaultSoftDelete = 0;
    protected $deleteTime = 'delete_time';

    // 关闭自动时间戳
    protected $autoWriteTimestamp = false;

    public function department()
    {
        return $this->belongsTo(DepartmentModel::class, 'department_id');
    }



}